﻿<Window x:Class="TV_Organizer.FileScanner.FileEditionWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:mwc="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit.Extended"
        xmlns:tvo="clr-namespace:TV_Organizer" xmlns:tvoep="clr-namespace:TV_Organizer.EPGuides"
        xmlns:tvop="clr-namespace:TV_Organizer.Properties" MinWidth="100" MinHeight="200" Padding="10"
        SizeToContent="WidthAndHeight" WindowStartupLocation="CenterScreen" mc:Ignorable="d">
  <Window.Resources>
    <Style TargetType="TextBlock">
      <Setter Property="VerticalAlignment" Value="Center" />
      <Setter Property="Margin" Value="2" />
    </Style>

    <Style TargetType="ComboBox">
      <Setter Property="Margin" Value="2" />
      <Setter Property="ItemsPanel">
        <Setter.Value>
          <ItemsPanelTemplate>
            <VirtualizingStackPanel IsVirtualizing="True" />
          </ItemsPanelTemplate>
        </Setter.Value>
      </Setter>
    </Style>

    <Style TargetType="Button">
      <Setter Property="Margin" Value="2" />
    </Style>
  </Window.Resources>

  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="Auto" />
      <ColumnDefinition Width="Auto" />
    </Grid.ColumnDefinitions>

    <TextBlock Grid.ColumnSpan="2" FontSize="16" FontWeight="Bold" Text="Edit file(s)" />


    <TextBlock Grid.Row="1" Grid.Column="0" Text="Show:" />
    <ComboBox Name="ShowComboBox" Grid.Row="1" Grid.Column="1" IsEditable="True"
              SelectedItem="{Binding SelectedShow}" />


    <StackPanel Grid.Row="2" Grid.ColumnSpan="2" Orientation="Horizontal">
      <TextBlock Text="Season: " />
      <mwc:IntegerUpDown FormatString="D2" Value="{Binding Season}" />
      <TextBlock Text="Episode: " />
      <mwc:IntegerUpDown FormatString="D2" Value="{Binding Episode}" />
    </StackPanel>

    <TextBlock Grid.Row="3" Grid.Column="0" Text="Format:" />
    <ComboBox Grid.Row="3" Grid.Column="1" IsEditable="True" ItemsSource="{Binding Path=FileScannerFormats, Source={x:Static tvop:Settings.Default}}" SelectedItem="{Binding Format}" />

    <TextBlock Grid.Row="4" Grid.Column="0" Text="Source:" />
    <ComboBox Grid.Row="4" Grid.Column="1" IsEditable="True" ItemsSource="{Binding Path=FileScannerSources, Source={x:Static tvop:Settings.Default}}" SelectedItem="{Binding Source}" />

    <TextBlock Grid.Row="5" Grid.Column="0" Text="Codec:" />
    <ComboBox Grid.Row="5" Grid.Column="1" IsEditable="True" ItemsSource="{Binding Path=FileScannerCodecs, Source={x:Static tvop:Settings.Default}}" SelectedItem="{Binding Codec}" />

    <TextBlock Grid.Row="6" Grid.Column="0" Text="Team:" />
    <ComboBox Grid.Row="6" Grid.Column="1" x:Name="TeamTextBox" IsEditable="True" ItemsSource="{Binding Path=FileScannerTeams, Source={x:Static tvop:Settings.Default}}" SelectedItem="{Binding Team}" />

    <Button Name="OKButton" Grid.Row="10" Grid.Column="0" Click="OKButton_Click" IsDefault="True">OK</Button>
    <Button Name="CancelButton" Grid.Row="10" Grid.Column="1" Click="CancelButton_Click" IsCancel="True">Cancel</Button>
  </Grid>
</Window>
